package com.xtgg.main;

import com.umeng.analytics.MobclickAgent;
import com.xtgg.R;
import com.xtgg.manager.BaseActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class SearchBabyActivity extends BaseActivity implements OnClickListener{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_search_baby);
		
		((TextView) findViewById(R.id.center)).setText("跟踪寻人");
		MobclickAgent.onEvent(this, ((TextView) findViewById(R.id.center))
				.getText().toString());
		
		findViewById(R.id.action0).setOnClickListener(this);
		findViewById(R.id.action1).setOnClickListener(this);
		findViewById(R.id.action2).setOnClickListener(this);
		findViewById(R.id.left).setOnClickListener(this);
	}

	@Override
	public void onClick(View arg0) {
		switch(arg0.getId())
		{
		case R.id.left:
			finish();
			break;
		
		case R.id.action0:
			startActivity(new Intent(this,SearchMapActivity.class));
			break;
			
		case R.id.action1:
			startActivity(new Intent(this,SearchWebActivity.class));
			break;
			
		case R.id.action2:
			Intent intent = new Intent(this,SearchCancelActivity.class);
			intent.putExtra("baby", getIntent().getStringExtra("baby"));
			startActivity(intent);
			break;
		}
	}
}
